
$(function() {
	
	$('#date').datepicker(_date1_option);
	
	$("input[id='customer']:visible").autocomplete(Test.customer);
	
	Tip.emp('负责人');
	
	$("#engineer").autocomplete(Test.emp);

	Tip.supplier();
	
	$('#supplier').blur(function() {
		var a = $(this).val();
		
		var body = { };
		body.id = a;
		$.getJSON('contact.php?do=Supplier.ajax_id', body, function(json) {
			$("#c_name").val(json.name);
			$("#c_fullname").val(json.fullname);
			$("#c_address").val(json.address);
			$("#c_web").val(json.url);
		});
		
		var body = {};
		body.q = a;
		
		$.getJSON('finance.php?do=PaymentMy.ajax_linkman', body, function(json) {			
			Supplier.linkman(json);
		});
	});
	
	$("#label_linkman").hide();
	
	$("input[id^='code']:visible").autocomplete(Test.mold_code);
		
	$('textarea').css("width", 400);

});
